package com.wardrobe.dao.goods_classify;

import com.wardrobe.domain.common.BackEndFromBean;
import com.wardrobe.domain.goods_classify.ClassifyGoodShowBean;
import com.wardrobe.domain.goods_classify.GoodsClassifyBean;
import com.wardrobe.mapper.master.goods_classify.GoodsClassifyMasterMapper;
import com.wardrobe.mapper.slave.goods_classify.GoodsClassifySlaveMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/11/16.
 */
@Service
public class GoodsClassifyDao {
    @Autowired
    private GoodsClassifySlaveMapper goodsClassifySlaveMapper;
    @Autowired
    private GoodsClassifyMasterMapper goodsClassifyMasterMapper;

    public int insertGoodsClassify(GoodsClassifyBean classifyBean){
        return goodsClassifyMasterMapper.insertGoodsClassify(classifyBean);
    }

    public int updateGoodsClassify(BackEndFromBean fromBean){
        return goodsClassifyMasterMapper.updateGoodsClassify(fromBean);
    }

    public List<GoodsClassifyBean> selectGoodsClassify(int status){
        return goodsClassifySlaveMapper.selectGoodsClassify(status);
    }
    public List<Map<String,Object>> classifyList(int status){
        return goodsClassifySlaveMapper.classifyList(status);
    }

    public List<ClassifyGoodShowBean> classifyGoods(int classifyId) {
        return goodsClassifySlaveMapper.classifyGoods(classifyId);
    }
}
